def fn1(x):
    if x == 1:
        return 1
    else:
        total = x * fn1(x - 1)
    return total


print(fn1(9))


def fn2(start, end):
    total = start
    if start < end:
        total = total + fn2(start + 1, end)
    return total


print(fn2(1, 100))

print('--------111111111------')


def aaa():
    print("aaa")


def bbb():
    print("bbb")


def ccc(func):
    def inner():
        print("ccc")
        func()

    return inner


aaa = ccc(aaa)
bbb = ccc(bbb)

aaa()
bbb()


dict1 = {'河北': {"石家庄": ["鹿泉", "藁城", "元氏"], "邯郸": ["永年", "涉县", "磁县"]},
         '河南': {'郑州': ['金水区', '二七区', '管城区'], '南阳': ['卧龙区', '高新区', '唐河县']},
         '山西省': {'市区': ['市一区', '市二区', '市三区'], '县区': ['县一区', '县二区', '县三区']}}



while True:
    proKeys = dict1.keys()
    print(proKeys)
    pro = input("请输入省份名称")
    if pro in proKeys:
        dict2 = dict1[pro]
        cityKeys = dict2.keys()
        print(cityKeys)


        city = input("请输入城市名称")
        if city in  cityKeys:
            list1 = dict2[city]
            print(list1)
        else:
            print("请输入正确的城市")
    else:
        print("你输入的省份有误")




